address command 'dms viewdiz' qfilename 'save' diz
if DmsConv ~= "" & exists(diz) then address command DmsConv
end
/* .(gz|z|Z) ? */
when (left(buff, 2) == '1f'x || '8b'x) | (left(buff, 2) == '1f'x || '9d'x) then do
address command 'gzip -tv' qfilename
if RC ~= 0 then exit 10
end
/* .gif ? */
when left(buff, 4) == 'GIF8' then SendModem RED || 'GIF image, can''t check' || WHITE || CRLF
/* .jpg ? */
when substr(buff, 7, 4) == 'JFIF' then SendModem RED || 'JPEG image, can''t check' || WHITE || CRLF
/* .mpg ? */
when left(buff, 4) == '00'x || '00'x || '01'x || 'b3'x then SendModem RED || 'MPEG animation, can''t check' || WHITE || CRLF
otherwise do
LogEntry 'Unsupported archive format:' file
SendModem CRLF || RED || file 'is not of one of the supported archive formats!' || CRLF || 'Supported formats: *.(lha|lzh|run|zip|gz|z|Z|arj|dms|gif|jpg|mpg)' || WHITE || CRLF || CRLF
exit FailUnsupported
end
end
if open('dizfile', diz, 'r') then do
SendModem CLEAR || GREEN || 'Found a' diz 'from' file || ':' || WHITE || CRLF || CRLF
address command 'type' diz 'to TECHIO:' || ln
if GetYesNo(ln, CRLF || 'Do you want to keep this? ', 1) then do
if open('descfile', filename || '.desc', 'w') then do
do until eof('dizfile')
line = formatline(readln('dizfile'))
if line ~= "" then do
call writeln 'descfile', line
LogEntry '>' line
end
end
call close 'descfile'
end
end
else LogEntry 'Discarding diz'
call close 'dizfile'
end
call pragma 'd', olddir
address command 'delete' TempDir 'all'
SendModem WHITE || CRLF
exit 0
/* add path/filename to path */
addpart:
front = arg(1)
rear = arg(2)
char = right(front, 1)
if char ~= "/" & char ~= ":" then return front || "/" || rear
return front || rear
/* check for viruses */
check:
address 'Virus_Checker' 'checkdrive\' || TempDir
if VCHECK.0.0 > 0 then do
LogEntry '*** VIRUS INFECTION DETECTED ***'
SendModem CRLF || RED || '*** VIRUS ALERT ***' || CRLF 'The following files have been infected:' || CRLF